<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div ng-app="myApp" ng-controller="myCtrl">
        <button ng-click="toggle()">隐藏/显示</button>
        <p ng-hide="myVar">
            <input type="text" ng-model="first">
            <br>
            <input type="text" ng-model="last">
            <br> Full Name: {{first+ " " +last}}
        </p>
    </div>
    <script src="../js/angular165/angular.min.js"></script>
    <script>
        var app = angular.module('myApp', []);
        app.controller('myCtrl', function($scope) {
            $scope.first = "kl";
            $scope.last = "ren";
            $scope.myVar = false;
            $scope.toggle = function() {
                $scope.myVar = !$scope.myVar;
            }
        })
    </script>
</body>

</html>